package cpr.data;

import java.util.Comparator;

public class AttrFreqComparator implements Comparator {
    public int compare(Object o1, Object o2) {
    	int d = ((AttrFreq)o1).counter - ((AttrFreq)o2).counter;
    	if (d!=0) return d;
    	d = ((AttrFreq)o1).sampleRule.attrValueDigital - ((AttrFreq)o2).sampleRule.attrValueDigital;
//    	d = ((AttrFreq)o1).sampleRule.attrValue.compareTo(((AttrFreq)o2).sampleRule.attrValue);
    	return d;
    }
}